package com.kingsoft.dc.khaos.module.spark.model.TechCheck;


public enum KsyunErrorCode {

    //表级检核
    DDL_FORMAT("0200001F","DDL文件格式检核","fail"),
    XML_FORMAT("0200002F","控制文件格式检核","fail"),
    REJECT_ERROR("00000000","错误数超过允许错误记录比例","fail"),
    XML_FILE_NAME_CHECK("00000000","XML存放的数据文件名与数据文件的文件名不一致","warn"),
    XML_RECORD_COUNT("0200010W","记录数检核","warn"),
    XML_FILE_SIZE_CHECK("0200010W","文件尺寸检核","warn"),
    //记录检核
    COLUMN_CHECK("0200801R","字段个数检核","reject"),
    KEY_CHEKC("0200101R","主键字段检核","reject"),
    //字符串型
    STRING_FIX_LENG("0200201R","定长字段长度不符","reject"),
    STRING_NOTFIX_LENG("0200202R","变长字段超出长度限制","reject"),
    STRING_A_CHECK("0200902W","字母类型字符串检核","warn"),
    STRING_N_CHECK("0200903W","数字类型字符串检核","warn"),
    STRING_AN_CHECK("0200904W","字母数字类型字符串检核","warn"),
    //数值类型
    INT_LENG_CHECK("0200301R","整型检核（长度）","reject"),
    INT_LEGAL_CHECK("0200302R","整型检核(字符合法)","reject"),
    FLOAT_LENG_CHECK("0200402R","浮点型检核(长度)","reject"),
    FLOAT_LEGAL_CHECK("0200403R","浮点型检核(字符合法)","reject"),
    //日期类型
    DATE_LEGAL_CHECK("0200502R","日期检核(date类型)","reject"),
    TIME_LEGAL_CHECK("0200602R","日期检核(time类型)","reject"),
    SPECIAL_DATE_LEGAL_CHECK("0200994R","特殊日期类型检核(MMDD,MM,DD,MMDDHHMMSS)","reject"),
    DATE_DEFAULT_CHECK("0200502W","Date字段检核(默认值)","warn"),
    DEFAULT_ERROR("00000000","未知问题","reject");

    KsyunErrorCode(String code, String name, String lever) {
        this.code = code;
        this.name = name;
        this.lever = lever;
    }
    public String toString(){
        return "("+ code +")"+name;
    }
    final public String code;
    final public String name;
    final public String lever; //错误类型 ， 取值： fail(表级) reject(字段级) warn(表级，字段级)

}
